package com.trinity.order.refund.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.trinity.order.refund.domain.XcRefundOrder;
import com.trinity.orders.domain.XcOrders;

import java.util.List;

/**
 * 退款订单Service接口
 *
 * @author 董诗攀
 * @date 2024-02-26
 */
public interface IXcRefundOrderService extends IService<XcRefundOrder> {
    /**
     * 查询退款订单
     *
     * @param id 退款订单主键
     * @return 退款订单
     */
    public XcRefundOrder selectXcRefundOrderById(Long id);

    /**
     * 查询退款订单列表
     *
     * @param xcRefundOrder 退款订单
     * @return 退款订单集合
     */
    public List<XcRefundOrder> selectXcRefundOrderList(XcRefundOrder xcRefundOrder);

    /**
     * 新增退款订单
     *
     * @param xcRefundOrder 退款订单
     * @return 结果
     */
    public int insertXcRefundOrder(XcRefundOrder xcRefundOrder);

    /**
     * 修改退款订单
     *
     * @param xcRefundOrder 退款订单
     * @return 结果
     */
    public int updateXcRefundOrder(XcRefundOrder xcRefundOrder);

    /**
     * 批量删除退款订单
     *
     * @param ids 需要删除的退款订单主键集合
     * @return 结果
     */
    public int deleteXcRefundOrderByIds(Long[] ids);

    /**
     * 删除退款订单信息
     *
     * @param id 退款订单主键
     * @return 结果
     */
    public int deleteXcRefundOrderById(Long id);

    List<XcRefundOrder> selectRefundOrderDuration(int minutes);

    /**
     * 关闭不存在的订单
     * @param transactionId
     * @param outTradeNo
     * @param outRefundNo
     * @param refundId
     */
    void closeRefundNotExit(String id,String transactionId, String outTradeNo, String outRefundNo, String refundId);

    /**
     * 查询退款中的
     * @param refundNo
     * @return
     */
    XcRefundOrder selectRefundOrderByRefundNO(String refundNo);

    List<XcRefundOrder> selectRefundOrderListByOrderId(String id);
}
